package com.luyuan.gallery.service.impl;

import java.util.List;
import com.luyuan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luyuan.gallery.mapper.ExhiLikesMapper;
import com.luyuan.gallery.domain.ExhiLikes;
import com.luyuan.gallery.service.IExhiLikesService;

/**
 * 点赞记录Service业务层处理
 * 
 * @author luyuan
 * @date 2025-11-19
 */
@Service
public class ExhiLikesServiceImpl implements IExhiLikesService {
    @Autowired
    private ExhiLikesMapper exhiLikesMapper;

    /**
     * 查询点赞记录
     * 
     * @param id 点赞记录主键
     * @return 点赞记录
     */
    @Override
    public ExhiLikes selectExhiLikesById(Long id) {
        return exhiLikesMapper.selectExhiLikesById(id);
    }

    /**
     * 查询点赞记录列表
     * 
     * @param exhiLikes 点赞记录
     * @return 点赞记录
     */
    @Override
    public List<ExhiLikes> selectExhiLikesList(ExhiLikes exhiLikes) {
        return exhiLikesMapper.selectExhiLikesList(exhiLikes);
    }

    /**
     * 新增点赞记录
     * 
     * @param exhiLikes 点赞记录
     * @return 结果
     */
    @Override
    public int insertExhiLikes(ExhiLikes exhiLikes) {
        exhiLikes.setCreateTime(DateUtils.getNowDate());
        return exhiLikesMapper.insertExhiLikes(exhiLikes);
    }

    /**
     * 修改点赞记录
     * 
     * @param exhiLikes 点赞记录
     * @return 结果
     */
    @Override
    public int updateExhiLikes(ExhiLikes exhiLikes) {
        exhiLikes.setUpdateTime(DateUtils.getNowDate());
        return exhiLikesMapper.updateExhiLikes(exhiLikes);
    }

    /**
     * 批量删除点赞记录
     * 
     * @param ids 需要删除的点赞记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiLikesByIds(Long[] ids) {
        return exhiLikesMapper.deleteExhiLikesByIds(ids);
    }

    /**
     * 删除点赞记录信息
     * 
     * @param id 点赞记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiLikesById(Long id) {
        return exhiLikesMapper.deleteExhiLikesById(id);
    }
}
